Skip to content

Instantly share code, notes, and snippets.

@nateware
nateware / gist:3915757
Created October 19, 2012 01:27
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active December 20, 2025 18:33
Japanese Subtitles

FYI (July 24, 2025): I've been away since July 11, dealing with an emergency move. I'll be back working on all the amazing comments y'all have been putting down, most possibly by the first weekend of August. I appreciate all the contributions everybody has been making and all the time everybody has put to make all of our lives better.

Streaming Whitelists and Blacklists for PiHole

Last Updated On:           July 10, 2025
Last Updated Platform:     Peacock

Table of Contents

@epilys
epilys / dump_core.rs
Created March 12, 2020 06:26
easy core dump on panic in rust for debugging
pub fn register_panic_handler() {
let default_panic = std::panic::take_hook();
std::panic::set_hook(Box::new(move |panic_info| {
default_panic(panic_info);
// Don't forget to enable core dumps on your shell with eg `ulimit -c unlimited`
let pid = std::process::id();
eprintln!("dumping core for pid {}", std::process::id());
@clmrb
clmrb / enum.js
Last active December 20, 2025 18:28
JavaScript enum function with working JSDoc autocompletion
/**
* @description
* Creates a frozen enumeration object where each key maps to its own string value.
* This is useful for defining a set of constant string values that can be referenced by name.
* This also avoids defining an object with duplicated string values manually.
* @template {string} T
* @param {...T} values
* @returns {{ [K in T]: K }}
* @example
* const Colors = Enum('Red', 'Green', 'Blue');
@mathysEthical
mathysEthical / cookie-encrypter.md
Last active December 20, 2025 18:25
cookie-encrypted bit flip attack.
@awni
awni / mlx_distributed_deepseek.md
Last active December 20, 2025 18:23
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@eylenburg
eylenburg / msoffice_in_linux.md
Last active December 20, 2025 18:00
Installing Microsoft Office in Linux

Step by step guide: How to install Microsoft Office in any Linux distribution

There are multiple options how to install MS Office on Linux.

VM-based - Integrate Windows apps running in a Windows virtual machine as native-looking in Linux

  1. LinOffice - Microsoft Office Launcher for Linux, my own fork of Winapps which is focused on only running Microsoft Office, with some Office-specific improvements over Winapps and a fully automated setup. Eventually I would like to create a GUI for it. Decribed below
  2. Winapps, based on KVM, QEMU, Docker/Podman and FreeRDP. Still actively maintained (getting Github commits). Decribed below
  3. Cassowary, based on KVM, QEMU, libvirt/virt-manager, and FreeRDP. Last release in Feb 2022 and seems to be abandoned.
@cmdcolin
cmdcolin / gather_commits.sh
Last active December 20, 2025 17:59
plot lines of code over time from a git repository
#!/usr/bin/env bash
## uses home directory to avoid git clean in repo clearing files
touch ~/lines
## choice 1. for all commits
git log --pretty=format:'%h %as'|sed 's/ /\t/' >! ~/commitlog
## choice 2. for all tags
git for-each-ref --sort=creatordate --format '%(refname) %(creatordate:short)' refs/tags|sed -e 's/refs\/tags\///'|sed 's/ /\t/' >! ~/commitlog